<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="height=device-height,width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no"/>
<title>注册</title>
<link href="<{$ipath}>minisite/hotel/style/hotel_login.css" type="text/css" rel="stylesheet">
<link href="<{$ipath}>public/style/alert_css.css" type="text/css" rel="stylesheet">
<script src="<{$ipath}>public/js/jquery.js"></script>
<style>
.yonghu{ width:100%; height:100%; background:rgba(0,0,0,0.5); position:absolute; top:0; left:0; z-index:10; display:none;}
.neirong{ width:94%; height:94%; background-color:#FFF; margin:0 auto; margin-top:3%;}
/*.p01{ text-align:center;}*/
.p02{ text-align:center; padding-top:10px;}
</style>
<script>
    //微信去头
	window.onload = function() { 
	var ua = navigator.userAgent.toLowerCase();
	if(ua.match(/MicroMessenger/i) == "micromessenger"){
		 document.getElementById("header").style.display="none";
		 $('.div02').addClass('top_40');
	}
	};
	//点击弹出框取消
	function alert_show(str){
		document.getElementById("alert_p").innerHTML=str;
		document.getElementById("alert_box").style.display="block";
		}
	function alert_quxiao(str){
		document.getElementById("alert_box").style.display="none";
		}
	//验证电话号码手机号码  
	function isMobel(value)
	{
		if(/^13\d{9}$/g.test(value)||(/^15\d{9}$/g.test(value))||(/^17\d{9}$/g.test(value))|| (/^18\d{9}$/g.test(value)))
		{ return false; }
		else
		{ return true; }
	}
	function zhuce(phone){
		var user=document.getElementById("userid").value;
		var passid=document.getElementById("passid").value;
			
			//手机号为空时
			if(user==''){
				/*alert("请输入手机号");*/
				alert_show('请输写手机号码');
				return false;
				}
			//请输入正确的手机号码
        	if(isMobel(user)){
				/*alert("请正确填写手机号码!");*/
				alert_show('请填写正确的手机号码');
				return false;
        	}
			//如果不为空则执行隐藏显示	
			if(user!=''){
				document.getElementById("up").style.display="none";
				document.getElementById("down").style.display="block";
				}
			
		}
	
	//密码的方法
	function pass(){
			if(document.getElementById("passid").value==''){
				/*alert("请填写密码");*/
				alert_show('您还没有填写密码哦');
				return false;
				}
			var passid=document.getElementById("passid").value; 
			if(passid.length>16||passid.length<6){
				/*alert("密码在6-16位之间")*/
				alert_show('密码在6-16位之间');
				return false;
				}
					document.getElementById("zhuce_form").submit();
		}
	//zhuce方法结束
	//点击眼睛看见密码
	function eyeclick(){
		var passid=document.getElementById("passid");
		var showpass=document.getElementById("img03").getAttribute('src');
		if(passid.getAttribute("type") == 'password'){
			passid.setAttribute("type","text");
			//showpass=='<{$ipath}>minisite/hotel/images/eye01.png';
			document.getElementById("img03").setAttribute('src','<{$ipath}>minisite/hotel/images/eye02.png');
		}else{
			passid.setAttribute("type","password");
			document.getElementById("img03").setAttribute('src','<{$ipath}>minisite/hotel/images/eye01.png');
		}
	}
//jquery
$(document).ready(function(e) {
	/*alert(1)*/
    $(".check_img").toggle(function(){
		$(this).attr("src","<{$ipath}>minisite/hotel/images/check02.png");
		
		},function(){
		$(this).attr("src","<{$ipath}>minisite/hotel/images/check.png");	
			})
		
});
</script>

</head>

<body>
<!--alert弹窗-->
<div class="alert_box" id="alert_box">
	<div class="alert_content">
    	<P class="alert_p" id="alert_p">我是弹出内容</P>
        <div class="alert_div">
        	<p class="quxiao" onClick="alert_quxiao();">确定</p>
        </div>
    </div>
</div>
<!--alert弹窗-->
<div class="bigbox">
	<div class="topbox" id="header">
    	<div>
        	<a onclick="history.go(-1);"><img src="<{$ipath}>minisite/hotel/images/hotel_01.png"></a>
            <p>注册</p>
        </div>
    </div>
    <form action="?a=reg" method="post" id="zhuce_form" target="hiddfrm"> 
   	  <div class="up" id="up">
            <div class="div02">
                <p class="p01">
                    <span class="jia">+86</span>
                    <input type="text" name="username" placeholder="请输入手机号" class="put" id="userid" >
                </p>
            </div>
            <!--<P class="xieyi">
            <img src="<{$ipath}>minisite/hotel/images/check02.png" class="check_img" id="check_img"><span class="yi">我已经阅读并同意"企悦用户协议"</span>
            </P>-->
            <div class="next">
                <p class="button03 dian" id="next01" onClick="zhuce();">下一步</p>
            </div>
        </div>
        <div class="down" id="down" style="display:none;">
            <div class="div02">
                <p class="p01">
                    <img src="<{$ipath}>minisite/hotel/images/eye01.png" class="img03" id="img03" onClick="eyeclick();">
                    <input type="password" name="password" placeholder="请填写密码"  class="put eye" id="passid" size="8" onkeyup="value=value.replace(/[^a-z0-9_]/g,'')">
                </p>
            </div>
            <P class="xieyi02">
            密码可使用英文、数字或下划线，长度为6~16个字
            </P>
            <div class="next">
                <input type="hidden" name="hid" value="<{$hid}>" /><p class="button03" id="next02" onClick="pass();">下一步</p>
            </div>
        </div>
    </form>
</div>
<script>
    
</script>
<iframe width="0" height="0" name="hiddfrm" id="hiddfrm" scrolling="no" frameborder="0" style="display:none"></iframe>
</body>
</html>
